<?php 
$CI =& get_instance();
$CI->load->database();
$CI->load->library("front/header_lib");
$query_pages = $CI->db->get_where('bur_staticpages',array('staticpage_link'=>'design_directory'));
foreach($query_pages->result() as $row_vals)
{
    $title = $row_vals->staticpage_title;
	$metakey_page = $row_vals->staticpage_metakey;
    $metadesc_page = $row_vals->staticpage_metadesc;  
}
$CI->header_lib->display_header_element(array("script"=>array("jquery-1.4.2"),"page_title"=>$title,"metakey_page"=>$metakey_page,"metadesc_page"=>$metadesc_page));
$data['delete'] = 1 ;

$CI->header_lib->display_header($datas);


$CI->load->model('Directory_company_model');
$data[] = 1;
//echo $CI->session_user_id;
$count = $CI->Directory_company_model->get_view_count($CI->session_user_id);

$data['view_count'] = $count['view_count'];
$data['lead_count'] = $count['lead_count'];

$listing_active = $CI->Directory_company_model->get_listing_status($CI->session_user_id);
?>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo base_url();?>xhtml/css/tia.css" />
<!--body content starts-->
<div id="container_wrapper">
	<div id="body_container">
    	<div class="left_part">
        	<?php echo $CI->header_lib->display_panel_left($data);?>
        </div>
    	
        <div class="page">
       		<div class="">
                    <h2 class="border">delete your advert</h2>
                    <?php if(!empty($notification)){ ?>
                    <p class="inform f12 error_message"><?php echo $notification ?></p>
                    <?php } ?>
                    <?php 
                    $attributes = array('class' => 'dirad', 'id' => 'myform');
                    echo form_open('directory/panel/delete_advert',$attributes);?>
                    
                    <div class="delete_box"><input type="checkbox" name="delete_advertId" id="delete_advertId" />
                    
                    Yes permanently delete my company from the directory.</div>
                    <hr />
                    
                    <div class="">
                    <div class="" >
                    <?php 
                    $form_button = array(
                      'type'=>'submit',
                      'id' =>'delete_submit',
                      'name'=>'submit',
                      'value'=>'submit',
                      'content'=>'Submit',
                    );
                    echo form_button($form_button) ?>
                    
                    </div><!-- bright -->
                    <div class="clear"></div>
                    </div><!-- box -->
                    <?php echo form_close(); ?><!-- dirad -->
                    </div>   
    	</div>
     <div class="clear"></div> 
	</div>
</div>
<!--body content ends-->


<?php
$CI->load->library("front/footer_lib");
$CI->footer_lib->display_footer();
?>
<script type="text/javascript">
$('#delete_submit').click(function(){
    if($('#delete_advertId').is(':checked'))
    {
        if(confirm('Are you sure to delete your advert?'))
            return true;
        else
            return false;
    }
    else
    {
        return false;
    }
});
</script>
<?php
$CI->footer_lib->display_footer_element();

?>